home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000331_bon@LTE.E-TECH…uni-erlangen.de_Wed Feb 23 20:38:39 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  7KB

  1. Received: from lte.lte.e-technik.uni-erlangen.de (lte.e-technik.uni-erlangen.de) by cs.umb.edu with SMTP id AA04110
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Wed, 23 Feb 1994 15:06:32 -0500
  3. Message-Id: <199402232006.AA04110@cs.umb.edu>
  4. Received: by lte.lte.e-technik.uni-erlangen.de
  5.     (1.37.109.8/16.2) id AA15444; Wed, 23 Feb 1994 19:38:39 +0100
  6. Date: Wed, 23 Feb 1994 19:38:39 +0100
  7. From: Uwe Bonnes <bon@LTE.E-TECHNIK.uni-erlangen.de>
  8. To: tex-k@cs.umb.edu
  9. Subject: Patch for bounding box with psfig
  10.  
  11. For the eps-file appended, for me xdvik-1.6 didn't show the very left margin.
  12. Here is a patch to round the bounding-box always to the safe side, so
  13. the left border gets visible.
  14. Some time ago, I put another patch for epsf.c on this mailing-list, the
  15. patch is against that version, so don't worry about different line-numbers.
  16.  
  17. *** epsf.1.c    Tue Feb 15 21:39:55 1994
  18. --- epsf.c    Wed Feb 23 18:59:38 1994
  19. ***************
  20. *** 522,531 ****
  21.         return;
  22.       }
  23.   
  24. !   llx = (int) ((float)(psfig_llx) / 65536.0);
  25. !   lly = (int) ((float)(psfig_lly) / 65536.0);
  26. !   urx = (int) ((float)(psfig_urx) / 65536.0);
  27. !   ury = (int) ((float)(psfig_ury) / 65536.0);
  28.     scaled_width = (int) ((float)(psfig_width) / 65536.0);
  29.     scaled_height = (int) ((float)(psfig_height) / 65536.0);
  30.   
  31. --- 522,531 ----
  32.         return;
  33.       }
  34.   
  35. !   llx = floor( ((float)(psfig_llx) / 65536.0));
  36. !   lly = floor( ((float)(psfig_lly) / 65536.0));
  37. !   urx = ceil ( ((float)(psfig_urx) / 65536.0));
  38. !   ury = ceil ( ((float)(psfig_ury) / 65536.0));
  39.     scaled_width = (int) ((float)(psfig_width) / 65536.0);
  40.     scaled_height = (int) ((float)(psfig_height) / 65536.0);
  41.   
  42. ***************
  43. *** 535,545 ****
  44.     x_scale = ((float)(scaled_width)/(float)(width));
  45.     y_scale = ((float)(scaled_height)/(float)(height));
  46.   
  47. !   llx = (int) ((float)(llx) * x_scale);
  48. !   lly = (int) ((float)(lly) * y_scale);
  49. !   urx = (int) ((float)(urx) * x_scale);
  50. !   ury = (int) ((float)(ury) * y_scale);
  51. !   urx++; ury++;
  52.   
  53.     if (epsf_grey) {
  54.       put_grey_rectangle(PXL_H, PXL_V,
  55. --- 535,544 ----
  56.     x_scale = ((float)(scaled_width)/(float)(width));
  57.     y_scale = ((float)(scaled_height)/(float)(height));
  58.   
  59. !   llx = floor( ((float)(llx) * x_scale));
  60. !   lly = floor( ((float)(lly) * y_scale));
  61. !   urx = ceil ( ((float)(urx) * x_scale));
  62. !   ury = ceil ( ((float)(ury) * y_scale));
  63.   
  64.     if (epsf_grey) {
  65.       put_grey_rectangle(PXL_H, PXL_V,
  66.  
  67. ****************************************************************
  68. Here the latex-file that produced the offending dvi-file:
  69. \documentstyle[psfig]{article}
  70. %psfig version1.10
  71. \begin{document}
  72. \begin{center}
  73. \leavevmode
  74. \psfig{figure=unnamed.pstex}
  75. \end{center}
  76. \end{document}
  77. **********************************************************
  78. And here the eps-file unnamed.pstex.
  79.  
  80. %!PS-Adobe-2.0 EPSF-2.0
  81. %%Title: /tmp/xfig-fig015242
  82. %%Creator: fig2dev Version 2.1.8.1 Patchlevel 0
  83. %%CreationDate: Wed Feb 23 19:15:43 1994
  84. %%For: bon@aladin (Uwe Bonnes,3.28,7187,)
  85. %%Orientation: Portrait
  86. %%BoundingBox: -54 -1 376 265
  87. %%Pages: 0
  88. %%EndComments
  89. /$F2psDict 200 dict def 
  90. $F2psDict begin
  91. $F2psDict /mtrx matrix put
  92. /l {lineto} bind def
  93. /m {moveto} bind def
  94. /s {stroke} bind def
  95. /n {newpath} bind def
  96. /gs {gsave} bind def
  97. /gr {grestore} bind def
  98. /clp {closepath} bind def
  99. /graycol {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul
  100. 4 -2 roll mul setrgbcolor} bind def
  101. /col-1 {} def
  102. /col0 {0 0 0 setrgbcolor} bind def
  103. /col1 {0 0 1 setrgbcolor} bind def
  104. /col2 {0 1 0 setrgbcolor} bind def
  105. /col3 {0 1 1 setrgbcolor} bind def
  106. /col4 {1 0 0 setrgbcolor} bind def
  107. /col5 {1 0 1 setrgbcolor} bind def
  108. /col6 {1 1 0 setrgbcolor} bind def
  109. /col7 {1 1 1 setrgbcolor} bind def
  110. /col8 {.68 .85 .9 setrgbcolor} bind def
  111. /col9 {0 .39 0 setrgbcolor} bind def
  112. /col10 {.65 .17 .17 setrgbcolor} bind def
  113. /col11 {1 .51 0 setrgbcolor} bind def
  114. /col12 {.63 .13 .94 setrgbcolor} bind def
  115. /col13 {1 .75 .8 setrgbcolor} bind def
  116. /col14 {.7 .13 .13 setrgbcolor} bind def
  117. /col15 {1 .84 0 setrgbcolor} bind def
  118.  /DrawEllipse {
  119.     /endangle exch def
  120.     /startangle exch def
  121.     /yrad exch def
  122.     /xrad exch def
  123.     /y exch def
  124.     /x exch def
  125.     /savematrix mtrx currentmatrix def
  126.     x y translate xrad yrad scale 0 0 1 startangle endangle arc
  127.     savematrix setmatrix
  128.     } def
  129.  
  130.     end
  131. /$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def
  132. /$F2psEnd {$F2psEnteredState restore end} def
  133. %%EndProlog
  134.  
  135. $F2psBegin
  136. 0 setlinecap 0 setlinejoin
  137. -71.0 300.2 translate 0.240 -0.240 scale
  138. 0.500 setlinewidth
  139. n 1598 1013 m 1598 1013 l gs col-1 s gr
  140. 2.000 setlinewidth
  141. % Polyline
  142. n 113 1091 m 74 1091 l  74 1247 l  191 1247 l  191 1091 l  152 1091 l gs col-1 s gr
  143. % Polyline
  144. n 113 310 m 74 310 l  74 154 l  191 154 l  191 310 l  152 310 l gs col-1 s gr
  145. % Polyline
  146. n 1598 1013 m 1598 1065 l  1807 1065 l  1807 1013 l gs col-1 s gr
  147. % Polyline
  148. n 1651 388 m 1651 596 l  1546 596 l  1546 388 l  clp gs col-1 s gr
  149. % Polyline
  150. n 1651 805 m 1651 1013 l  1546 1013 l  1546 805 l  clp gs col-1 s gr
  151. % Polyline
  152. n 1598 596 m 1598 805 l gs col-1 s gr
  153. % Ellipse
  154. n 895 701 550 549 0 360 DrawEllipse gs col-1 s gr
  155. % Polyline
  156. n 1807 596 m 1807 805 l gs col-1 s gr
  157. % Interpolated spline
  158. n 152 310 m
  159.     151.508 355.252 151.508 374.781 152 388 curveto
  160.     153.069 406.065 157.773 448.506 160 466 curveto
  161.     164.462 502.001 178.976 586.754 183 622 curveto
  162.     185.110 635.809 187.065 655.337 191 701 curveto
  163. gs col-1 s gr
  164. % Polyline
  165. n 1859 805 m 1859 1013 l  1755 1013 l  1755 805 l  clp gs col-1 s gr
  166. % Polyline
  167. n 1859 388 m 1859 596 l  1755 596 l  1755 388 l  clp gs col-1 s gr
  168. % Polyline
  169. n 1598 388 m 1598 336 l  1807 336 l  1807 388 l gs col-1 s gr
  170. % Interpolated spline
  171. n 113 1091 m
  172.     112.421 1045.955 112.421 1026.427 113 1013 curveto
  173.     113.981 995.143 118.685 952.701 121 935 curveto
  174.     125.374 899.207 139.889 814.454 144 779 curveto
  175.     146.023 765.399 147.977 745.870 152 701 curveto
  176. gs col-1 s gr
  177. % Interpolated spline
  178. n 152 1091 m
  179.     151.508 1045.955 151.508 1026.427 152 1013 curveto
  180.     153.069 995.143 157.773 952.701 160 935 curveto
  181.     164.462 899.207 178.976 814.454 183 779 curveto
  182.     185.110 765.399 187.065 745.870 191 701 curveto
  183. gs col-1 s gr
  184. % Interpolated spline
  185. n 113 310 m
  186.     112.421 355.252 112.421 374.781 113 388 curveto
  187.     113.981 406.065 118.685 448.506 121 466 curveto
  188.     125.374 502.001 139.889 586.754 144 622 curveto
  189.     146.023 635.809 147.977 655.337 152 701 curveto
  190. gs col-1 s gr
  191. $F2psEnd
  192.  
  193. Uwe Bonnes  bon@lte.e-technik.uni-erlangen.de